﻿
    using Chain.BLL;
    using Chain.Model;
    using System;
    using System.Text.RegularExpressions;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;

    public partial class giftdetail : Page
    {

        private Chain.BLL.Mem Mbll = new Chain.BLL.Mem();
        protected int MemPoint;
        protected int point;
        private Chain.BLL.PointGift PointGiftBll = new Chain.BLL.PointGift();


        protected void Page_Load(object sender, EventArgs e)
        {
            if ((base.Request.Cookies["uid"] != null) && Regex.IsMatch(base.Request.Cookies["uid"].Value, @"^\d+$"))
            {
                this.MemPoint = this.Mbll.GetModelList(string.Format(" MemID='{0}' ", base.Request.Cookies["uid"].Value))[0].MemPoint;
                int GiftID = Convert.ToInt32(base.Request["GiftID"]);
                Chain.Model.PointGift PointGiftModel = this.PointGiftBll.GetModel(GiftID);
                this.giftdetail_gift.Src = PointGiftModel.GiftPhoto;
                this.giftdetail_GiftName.InnerText = PointGiftModel.GiftName;
                this.giftdetail_GiftExchangePoint.InnerText = PointGiftModel.GiftExchangePoint.ToString();
                this.point = PointGiftModel.GiftExchangePoint;
                this.giftdetail_GiftRemark.InnerText = PointGiftModel.GiftRemark;
                this.txtGiftID.Value = GiftID.ToString();
            }
        }
    }


